﻿#pragma once
#ifndef __INCLUDE_CSCRIPTMAPLE_H__
#define __INCLUDE_CSCRIPTMAPLE_H__

#include "dm.h"
class CScriptMaple
{
public:
	CScriptMaple();
	CScriptMaple(int nDmIndex,CDm* dm);
	~CScriptMaple();
	bool LoginOpenClient();
	bool LoginGame(bool isRole=false, bool isLogin=true);
	void ExitZkjt();
	void ExitZkrk();
	void ExitWls();
	bool MovetoX(int nEndX);
	bool FindComputer();
	void CloseTearm();
	void ChoseBoss(CString strBoss, int offX, int offY);
	void ChoseBoss(int x, int y);
	bool RunScriptList( CString str);
	void SetIndex(int i,bool bFlag);
	bool SetCodeState(CString ocr, CString state);
	void SwicthRole(bool isRole = false, bool isLogin = true);
	void ExitWlsMap();
	void ExitShiChang();
	bool ZhengLi();
	int LineSwitching();
	bool DropItem(CString& strWupin);
	bool Trading();
	bool SuppLies(CString strWuPin);
	void SetSubDm(CDm* dm);
	void CheckException();
	bool FindHwnd();
	int GetState()const;
	void LoginBoss();
	void DoWorkBoss();
	void BossBanBan();
	void BossXingXueNvWang();

	void ClearMonster();
	void MoveToBossXingXue();

	void BuXue();

	void AttackBoss();
	void FindItem();
	void MoveToBossBanBan();

protected:
	UINT m_State;//当前状态
	UINT m_Type;//当前运行脚本类型
	CDm* m_dm;
	BOOL m_CheckState;//是否检测客户端
	BOOL m_Flag;	//全局执行状态
	int m_Index;	//列表下标
	int m_DmIndex;	//大漠下标
	CDm* m_SubDm;	//子线程大漠
	int m_Time = 0;
	long m_nMiniX;
	long m_nMiniY;
	long m_nRoleX;
	long m_nRoleY;
};

#endif
